<template>
  <div class="q-pa-md">
    <t-responsive :ratio="16 / 9" style="width: 500px; max-width: 100%">
      <t-carousel swipeable animated arrows v-model="slide" infinite>
        <t-carousel-slide
          :name="1"
          img-src="https://cdn.quasar.dev/img/mountains.jpg"
        />
        <t-carousel-slide
          :name="2"
          img-src="https://cdn.quasar.dev/img/parallax1.jpg"
        />
        <t-carousel-slide
          :name="3"
          img-src="https://cdn.quasar.dev/img/parallax2.jpg"
        />
        <t-carousel-slide
          :name="4"
          img-src="https://cdn.quasar.dev/img/quasar.jpg"
        />

        <template v-slot:control>
          <t-carousel-control
            position="bottom"
            :offset="[16, 8]"
            class="text-white text-center rounded-borders"
            style="background: rgba(255, 255, 255, 0.2); padding: 4px 8px"
          >
            Ratio 16:9
          </t-carousel-control>
        </template>
      </t-carousel>
    </t-responsive>
  </div>
</template>

<script>
  import { ref } from 'vue';

  export default {
    setup() {
      return {
        slide: ref(1),
      };
    },
  };
</script>
